package factory.abstract_factory;


/**
 * @Author: Doream
 * @Date: 2022/1/27 23:14
 */
public class MilkTeaStore {
    private MilkTeaFactory factory;

    public MilkTeaStore(MilkTeaFactory factory){
        this.factory = factory;
    }

    public MilkTea saleAMilkTea(){
        return factory.createMilkTea();
    }

    public Juice saleAJuice() {return factory.createJuice();}

    public void setFactory(MilkTeaFactory factory) {
        this.factory = factory;
    }
}
